package jdbc;

import jdbc.utill.DButil;

import java.sql.Connection;
import java.sql.Statement;

public class DButilDemo02 {
    public static void main(String[] args) throws Exception {
      Connection connection = DButil.getConnection();
      Statement statement = connection.createStatement();
      String sql ="update t_user set username = '张富贵' where username='张三'";
      int num =statement.executeUpdate(sql);
        System.out.println(num>0?"success":"fail");
        DButil.close(connection);
    }
}
